Skip to main content

RCS Campaign APIs

The RCS Campaign APIs enable businesses to create and launch rich, interactive RCS campaigns. These APIs support advanced messaging features including rich cards, carousels, and interactive buttons.


Prerequisites
  1. RCS Business Account: Active RCS Business Messaging account with verified brand
  2. Msgkart Account: An active Msgkart account with API Key
  3. Approved Rich Cards: Pre-approved RCS message templates with rich media

Launch RCS Campaign with Form Data​

Creates and launches a new RCS campaign with rich media content.

Request Syntax​

POST api/v2/promotion/{{msgkartId}}/template/launch?name={{nameOfTargetList}}

Request headers​

    "x-api-key": "<API KEY>"

Form Data​

Use multipart/form-data to upload the CSV file along with the request body.

file: {{csvFile}}

body: JSON
{
"name": "{{promotionName}}",
"promotionType": "IMMEDIATE",
"promotionBase": "TEMPLATE",
"promotionTemplateType": "TEMPLATE",
"template": {
"name": "{{tempalteName}}",
"id": "{{tempalteId}}",
"language": "{{templateLanguage}}",
"components": [
{
"type": "CAROUSEL",
"cards": [
{
"card_index": 0,
"components": [
{
"type": "BODY",
"variables": [
{ "type": "text", "value": "${name}" },
{ "type": "text", "value": "${phone}" },
{ "type": "text", "value": "${language}" },
{ "type": "text", "value": "${businesssubscriberid}" },
{ "type": "text", "value": "${name}" },
{ "type": "text", "value": "${language}" },
{ "type": "text", "value": "${phone}" }
]
},
{
"type": "HEADER",
"format": "IMAGE",
"media": {
"mediaUrl": "{{mediaUrl}}"
}
}
]
},
{
"card_index": 1,
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"media": {
"mediaUrl": "{{mediaUrl}}"
}
}
]
}
]
}
]
},
"channelType": "rcs"
}


Launch RCS Campaign on an Uploaded List​

Launches an RCS campaign targeting contacts from an uploaded CSV file with rich interactive content.

Request Syntax​

POST api/v2/promotion/{{msgkartId}}/template/launch?name={{nameOfTargetList}}

Request headers​

    "x-api-key": "<API KEY>"

Request Body​

{
"name": "{{promotionName}}",
"promotionType": "IMMEDIATE",
"promotionBase": "TEMPLATE",
"promotionTemplateType": "TEMPLATE",
"template": {
"name": "{{tempalteName}}",
"id": "{{tempalteId}}",
"language": "{{templateLanguage}}",
"components": [
{
"type": "CAROUSEL",
"cards": [
{
"card_index": 0,
"components": [
{
"type": "BODY",
"variables": [
{
"type": "text",
"value": "${name}"
},
{
"type": "text",
"value": "${phone}"
},
{
"type": "text",
"value": "${language}"
},
{
"type": "text",
"value": "${businesssubscriberid}"
},
{
"type": "text",
"value": "${name}"
},
{
"type": "text",
"value": "${language}"
},
{
"type": "text",
"value": "${phone}"
}
]
},
{
"type": "HEADER",
"format": "IMAGE",
"media": {
"mediaUrl": "{{mediaUrl}}"
}
}
]
},
{
"card_index": 1,
"components": [
{
"type": "HEADER",
"format": "IMAGE",
"media": {
"mediaUrl": "{{mediaUrl}}"
}
}
]
}
]
}
]
},
"channelType": "rcs"
}

Properties​

PropertyDescriptionSample
campaignNameName of the RCS campaignBlack Friday Sale
messageTypeType of RCS messagerich_card, carousel, standalone
contentRich content object with title, description, and mediaSee request body
titleTitle of the rich cardExclusive Deals
descriptionDescription text for the cardGet up to 70% off
mediaUrlURL of the media (image/video)https://example.com/img.jpg
mediaHeightHeight of the mediaSHORT, MEDIUM, TALL
suggestionsInteractive action buttonsArray of suggestion objects
uploadedListIdID of the uploaded contact listlist_rcs_456
targetAudienceTarget audience segmentall, premium, engaged
scheduledTimeScheduled launch time (ISO 8601 format)2024-11-29T00:00:00Z

Get Promotions​

Retrieves all RCS campaigns for a specific business account.

Request Syntax​

GET /api/v2/promotion/{{msgkartId}}?channel=rcs

Request headers​

    "x-api-key": "<API KEY>"

Path Parameters​

ParameterTypeRequiredDescription
msgkartIdstringYesYour Msgkart business ID

Query Parameters​

ParameterTypeRequiredDescription
channelstringYesChannel type (use rcs for RCS)

Response Body​

{
"promotions": [
{
"promotionId": "{{promotionId}}",
"businessId": "{{businessId}}",
"msgkartId": "{{msgkartId}}",
"name": "{{promotionName}}",
"channelType": "rcs",
"status": "Completed",
"createdBy": null,
"promotionType": "IMMEDIATE",
"targetSource": "CSV",
"targetType": "{{targetType}}",
"flowId": null,
"flowName": null,
"promotionBase": null,
"attributionWindow": 0,
"promotionEndTime": 1765385829,
"createdDate": 1765385766
}
]
}

Get Promotion Statistics Report​

Retrieves detailed statistics and analytics for a specific RCS campaign.

Request Syntax​

GET /api/v2/promotion/{{msgkartId}}/statistics/{{promotionId}}/report?channel=rcs

Request headers​

    "x-api-key": "<API KEY>"

Path Parameters​

ParameterTypeRequiredDescription
msgkartIdstringYesYour Msgkart business ID
promotionIdstringYesID of the promotion

Query Parameters​

ParameterTypeRequiredDescription
channelstringYesChannel type (use rcs for RCS)

Response Body (CSV Format)​

Name,Phone,Status,Timestamp,Error,FlowId,FlowName,RetryCount,TemplateName,Language
{{name}},{{phone}},{{status}},{{timestamp}},{{error}},{{flowId}},{{flowName}},{{retryCount}},{{templateName}},{{language}}


Get Promotion Stats​

Retrieves real-time statistics for a specific RCS campaign.

Request Syntax​

GET /api/v2/promotion/{{msgkartId}}/{{promotionId}}/stats?channel=rcs

Request headers​

    "x-api-key": "<API KEY>"

Path Parameters​

ParameterTypeRequiredDescription
msgkartIdstringYesYour Msgkart business ID
promotionIdstringYesID of the promotion

Query Parameters​

ParameterTypeRequiredDescription
channelstringYesChannel type (use rcs for this endpoint)

Response Body​

{
"attempted": 8,
"failed": 2,
"sent": 0,
"delivered": 0,
"read": 6,
"interacted": 0,
"optout": 0,
"statsReport": [
{
"attempted": 8,
"failed": 2,
"sent": 0,
"delivered": 0,
"read": 6,
"interacted": 0,
"optout": 0,
"promotionRetryNumber": 0
}
]
}

Cancel RCS Campaign​

This action is allowed only during the campaign preparation phase. Once cancelled, the campaign will not exist and cannot be resumed.

Request Syntax​

PATCH /api/v2/promotion/{{msgkartId}}/{{promotionId}}?channel=rcs

Request headers​

    "x-api-key": "<API KEY>"

Path Parameters​

ParameterTypeRequiredDescription
msgkartIdstringYesYour Msgkart business ID
promotionIdstringYesID of the promotion to update

Query Parameters​

ParameterTypeRequiredDescription
channelstringYesChannel type (use rcs for RCS)

Request Body​

{
"type": "status",
"status": "Stopped"
}

Status Values​

ValueDescription
StoppedTemporarily stop the promotion (can be resumed)
CancelledPermanently cancel the promotion (cannot be resumed)

Response Body​

{
"promotionId": "{{promotionId}}",
"businessId": "{{businessId}}",
"msgkartId": "{{msgkartId}}",
"name": "{{promotionName}}",
"targetListId": "{{targetListId}}",
"targetListName": "{{targetListName}}",
"phoneNumberId": "{{phoneNumberId}}",
"template": {
"name": "{{templateName}}",
"id": "{{templateId}}",
"language": "{{language}}",
"category": "{{category}}",
"components": [
{
"variables": [
{
"type": "text",
"value": "{{name}}"
}
],
"type": "BODY"
},
{
"type": "HEADER",
"format": "IMAGE",
"media": {
"mediaUrl": "{{mediaUrl}}",
"fileName": "{{fileName}}"
}
}
]
},
"createdDate": 1765777610,
"startTime": 0,
"mostRecentStartTime": 0,
"status": "Cancelled",
"createdBy": "a599947d-bc5c-4b45-b93c-5a318e2e2243",
"promotionType": "IMMEDIATE",
"scheduleTime": "0",
"targetSource": "CSV",
"tagSearchCriteria": "ANY",
"retryPromotion": true,
"maxRetries": 3,
"retriesLeft": 3,
"channelType": "rcs",
"batchSize": 0,
"batchTimer": 0,
"staggered": false,
"subscriberLimitPerGroup": 0,
"attributionWindow": 0,
"promotionBase": "TEMPLATE",
"promotionEndTime": 1765777679,
"callCampaign": false,
"utilityTemplateIndex": 0,
"stopOnCategoryUpdate": false
}